package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.CheckGroup;
import com.itheima.pojo.Order;
import com.itheima.pojo.OrderList;
import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OrderDao {
    public void add(Order order);
    public List<Order> findByCondition(Order order);
    public List<Map> findListByCondition(Map map);
    public Map findById4Detail(Integer id);
    public Integer findOrderCountByDate(String date);
    public Integer findOrderCountAfterDate(String date);
    public Integer findVisitsCountByDate(String date);
    public Integer findVisitsCountAfterDate(String date);
    public List<Map> findHotSetmeal();
    List<Integer> findCheckGroupByMemberId(Integer id);
    Long findCountIdByMemberId(Integer id);

    void setOrderAndAddress(@Param("id") Integer id, @Param("addressIds") Integer addressIds);

    void deleteById(Integer id);

    void deleteByOrderId(Integer id);

    Map<String,Object> findByOrderId(Integer id);

    void changeStatus(Map<String,Object> map);

    Setmeal findSetmealById(Integer id);

    void edit(Order order);

    Order findById(Integer oid);

    public Integer findOrderCountoneDate(String s);

    Integer findVisitsCountoneDate(String s1);

    /**
     *根据条件查询所有会员订单信息
     * @param queryString
     * @return
     */
    Page<OrderList> selectByCondition(String queryString);

    /**
     * 修改订单到诊状态
     * @param order
     */
    void statusEdit(Order order);

    List<Map<String, Object>> findHistoryRecord(@Param("telephone") String telephone,
                                                @Param("startDate") String startDate,
                                                @Param("endDate") String endDate);

    Map<String, Object> getRecordDetails(Integer id);

    List<Map<String, Object>> getAddress(Integer id);

}
